#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
void testSwap()
{
	int a = 3;
	int b = 4;
	cout << "a=" << a << " b=" << b << endl;
	swap(a, b);
	cout << "a=" << a << " b=" << b << endl;
}
void testReverse()
{
	vector<int>vec = { 1,2,3,4,5 };
	reverse(vec.begin(), vec.end());
	for (int num : vec)
	{
		cout << num << " ";
	}
	cout << endl;
}
void testUnique()
{
	vector<int>vec = { 1,1,2,2,3,3,3,4,4,5 };
	auto it = unique(vec.begin(), vec.end());
	vec.erase(it, vec.end());
	for (int num : vec)
	{
		cout << num << " ";
	}
	cout << endl;
}
int main()
{
	//testSwap();
	//testReverse();
	testUnique();
	return 0;
}